require 'gosu'
require 'zindex'

class RubyStone
  attr_reader :x, :y
  
  SIZE=50
  SCORE=100
  ANIMATION_ANGLE=15
  
  def initialize(image, x, y)
    @image = image
    @x, @y = x * SIZE + SIZE / 2, y * SIZE + SIZE/2 
  end
  
  def draw(screen_x, screen_y)
    # Draw, slowly rotating
    @image.draw_rot(@x - screen_x, @y - screen_y, Zindex::GEM,
      ANIMATION_ANGLE * Math.sin(milliseconds / 150))
  end
end
